﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FindPassword.aspx.cs" Inherits="FindPassword" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>找回密码aa</title>
    <link href="style/owon.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-1.8.2.min.js"></script>
    <script>
        var count = 600;
        $(document).ready(function () {
            document.getElementById('duanxin').style.display = "none";

            if (GetRadioValue("RadioButtonList1") == "密保找回") {
                document.getElementById('regtb').style.display = "block";
                document.getElementById('duanxin').style.display = "none";
            }
            //if ($("#Rb_FindPassword_1").attr("checked") == "checked") {
            //    document.getElementById('regtb').style.display = "block";
            //    document.getElementById('duanxin').style.display = "none";
            //}


            $("#Rb_FindPassword_0").click(function () {
                document.getElementById('regtb').style.display = "block";
                document.getElementById('duanxin').style.display = "none";
                document.getElementById('tb_mobile').value = "";
                document.getElementById('tb_code').value = "";

            });
            $("#Rb_FindPassword_1").click(function () {
                document.getElementById('regtb').style.display = "none";
                document.getElementById('duanxin').style.display = "block";
                document.getElementById('TxtAnswer1').value = "";
                document.getElementById('TxtAnswer2').value = "";
                document.getElementById('TxtAnswer3').value = "";
                document.getElementById('TxtLogin').value = "";
                document.getElementById('TxtLogin1').value = "";
                document.getElementById('TxtPay').value = "";
                document.getElementById('TxtPay1').value = "";
            });

            $("#btnCode").click(function () {
                var mobile = document.getElementById("tb_mobile").value;
                var userid = document.getElementById("tb_user").value;
                count = 600;
                $.ajax({
                    type: "POST",
                    url: "../Member/GetVerificationCode.ashx",
                    data: { mobile: mobile, userid: userid },
                    async: false,
                    success: function (msg) {
                        if (msg == "true") {
                            GetNumber();
                            alert("已发送，请注意查收！");
                            //执行获取验证码的操作
                            
                        }
                        else { alert(msg); }
                    }
                });
                //$.ajax({
                //    type: "POST",
                //    url: "https://dx.ipyy.net/sms.aspx",
                //    data: { userid: "龙道免费午餐", account: "ZZ00018", password: "ZZ0001869", mobile: "18202769989", content: "测试发送12121", action: "send", content: "测试发送12121【ceshiceshi】&time=" },
                //    async: false,
                //    dataType: "json",
                //    success: function (msg) {
                //        alert(msg);
                        //if (msg == "true") {
                        //    GetNumber();
                        //    alert("已发送，请注意查收！");
                        //    //执行获取验证码的操作

                        //}
                        //else { alert(msg); }
                //    }
                //});
            });
        });
        function GetRadioValue(RadioName) {
            var obj;
            obj = document.getElementsByName(RadioName);
            if (obj != null) {
                var i;
                for (i = 0; i < obj.length; i++) {
                    if (obj[i].checked) {
                        return obj[i].value;
                    }
                }
            }
            return null;
        }


        function GetNumber() {
            $("#btnCode").attr("disabled", "disabled");
            count--;
           
            if (count > 1) {
                setTimeout(GetNumber, 1000);
                //$("#btnCode").attr("disabled", "disabled");
                //document.getElementById("btnCode").disabled = false;
                $("#btnCode").val(count + "秒之后点击获取")
            }
            else {
                $("#btnCode").val("点击获取验证码");
                //$("#btnCode").attr("disabled", "true");
                $('#btnCode').removeAttr("disabled");
            }
        }

        function FreashNumber() {
            //刷新账号
            $.ajax({
                type: "POST",
                url: "../Service/CommendHandler.ashx",
                async: false,
                success: function (msg) {
                    <%--  $('#<%=TxtUID.ClientID%>').val(msg);--%>
                }
            });
        }


    </script>
    <style>
        #duanxin {
            font-size: 14px;
            font-weight: bold;
            color: rgb(255, 255, 255);
            background: #EEEEEE;
        }

        td {
            font-family: 'Microsoft YaHei';
            font-family: "微软雅黑";
            font-weight: normal;
        }

        #duanxin input {
            background: #ffffff;
            border: 0px;
            height: 22px;
            line-height: 18px;
            font-size: 12px;
            margin: 5px;
            width: 250px;
        }

        #regtb input {
            width: 150px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <link href="style/style.css" rel="stylesheet" type="text/css" />
        <table style="border-bottom: 1px #e6e6e6 solid; height: 34px;"
            border="0" width="100%" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        <table id="top" align="center" border="0" width="980" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td align="center" style="font-size: 26px; font-weight: bold; color: #f00;">欢迎成为龙道免费午餐会员，从此吃饭不花钱！
                                    </td>
                                    <td width="300"></td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>

        <table style="width: 100%;" border="0" width="100%" cellpadding="0"
            cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        <table style="margin-top: 40px;" align="center" border="0" width="1000"
                            cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td valign="top">
                                        <!--content start-->
                                        <table style="background: #EEEEEE; height: 60px; margin-top: 15px; margin-bottom: 20px;"
                                            align="center" border="0" width="920" cellpadding="0" cellspacing="0">
                                            <tbody>
                                                <tr>
                                                    <td style="padding-left: 20px; padding-top: 30px;" valign="top" width="510">
                                                        <table border="0" width="510" cellpadding="0" cellspacing="0">
                                                            <tbody>
                                                                <tr>
                                                                    <td align="center" style="padding: 5px 15px 5px 0; font-size: 24px; color: #000;"><span>找回密码</span>
                                                                    </td>
                                                                </tr>
                                                                <tr style="margin-top: 5px;">
                                                                    <td align="center">
                                                                        <asp:RadioButtonList ID="Rb_FindPassword" RepeatDirection="Horizontal" runat="server">
                                                                            <asp:ListItem Selected="True" Value="0">密保找回</asp:ListItem>
                                                                            <asp:ListItem Value="1">短信找回</asp:ListItem>
                                                                        </asp:RadioButtonList></td>

                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                        <table id="duanxin" style="margin-top: 20px; margin-left: 50px;" border="0" width="510" cellpadding="0" cellspacing="0">
                                                            <tbody>
                                                                <tr style="">
                                                                    <td align="left" style="color: black;">输入手机号:
                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="tb_mobile" CssClass="input2" Text="" runat="server"></asp:TextBox></td>
                                                                    <td>
                                                                        <input id="btnCode" type="button" style="width: 120px; margin-left: 10px;" class="scbtn2" value="点击获取验证码" /></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" style="color: black;">输入验证码:

                                                                    </td>
                                                                    <td>
                                                                        <asp:TextBox ID="tb_code" CssClass="input2" Text="" runat="server"></asp:TextBox></td>
                                                                    <td>
                                                                        <asp:TextBox ID="tb_user" Width="0px" Text="" runat="server"></asp:TextBox></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" height="32" style="width: 90px; color: black">登录密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="tb_Login" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" height="32" style="color: black">确认密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="tb_Login1" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" height="32" style="width: 90px; color: black">二级密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="tb_Pay" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="left" height="32" style="color: black">确认密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="tb_Pay1" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                            </tbody>
                                                        </table>

                                                        <table id="regtb" style="margin-top: 20px; margin-left: 50px;" border="0" width="510" cellpadding="0" cellspacing="0">
                                                            <tbody>
                                                                <tr>
                                                                    <td colspan="3" height="10"></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="width: 90px; color: black">问题一：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:Label runat="server" ID="LblQuestion1" Style="color: black"></asp:Label>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="color: black">答案：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtAnswer1" runat="server" CssClass="input2" Width="250px"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="width: 90px; color: black">问题二：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:Label runat="server" ID="LblQuestion2" Style="color: black"></asp:Label>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="color: black">答案：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtAnswer2" runat="server" CssClass="input2" Width="250px"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="width: 90px; color: black">问题三：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:Label runat="server" ID="LblQuestion3" Style="color: black"></asp:Label>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="color: black">答案：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtAnswer3" runat="server" CssClass="input2" Width="250px"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="width: 90px; color: black">登录密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtLogin" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="color: black">确认密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtLogin1" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="width: 90px; color: black">二级密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtPay" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td align="right" height="32" style="color: black">确认密码：
                                                                    </td>
                                                                    <td width="250px">
                                                                        <asp:TextBox ID="TxtPay1" runat="server" CssClass="input2" Width="250px" TextMode="Password"></asp:TextBox>
                                                                    </td>
                                                                    <td>
                                                                        <font style="font-size: 12px;">*</font>
                                                                    </td>
                                                                </tr>
                                                            </tbody>
                                                        </table>

                                                        <table style="height: 40px;" border="0" width="410" cellpadding="0" cellspacing="0">
                                                            <tbody>
                                                                <tr>
                                                                    <td style="width: 150px"></td>
                                                                    <td>
                                                                        <asp:Button ID="btnSubmit" runat="server" Style="width: 107px; height: 26px; background: #2898CB; border: 0; cursor: pointer;"
                                                                            OnClick="btnAdd_Click" Text="提交" />
                                                                    </td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </td>
                                                    <td align="right">
                                                        <img src="images/reg_pic2.jpg" height="366" width="384">
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
